import { loadNewsByIdAPI } from '../../api/news';

export const getNewsById = (id) => {
  // 2. 封装一个API、定义异步action
  return async (dispatch) => {
    const { data } = await loadNewsByIdAPI(id);
    console.log(data);
    // 4. dispatch 触发保存数据的action
    // dispatch({ type: 'channel/setList', payload: results });
  };
};
